package com.oasystem.service.fund;

import java.util.List;

import com.oasystem.dao.jdbc.fund.AppropriationApplicationDao;
import com.oasystem.domain.PagingBean;
import com.oasystem.domain.fund.AppropriationApplication;

public class AppropriationApplicationService {
	private AppropriationApplicationDao appropriationApplicationDao;

	public List<AppropriationApplication> findAll(Integer approverId,
			int start, int limit) {
		return appropriationApplicationDao.findAll(approverId, start, limit);
	}

	public void insert(AppropriationApplication appropriationApplication) {
		appropriationApplicationDao.insert(appropriationApplication);
	}

	public void update(AppropriationApplication appropriationApplication) {
		appropriationApplicationDao.update(appropriationApplication);
	}

	public void setAppropriationApplicationDao(
			AppropriationApplicationDao appropriationApplicationDao) {
		this.appropriationApplicationDao = appropriationApplicationDao;
	}

	public void appropriationApplicationHistory(String applicant,
			PagingBean<AppropriationApplication> pagingBean) {
		this.appropriationApplicationDao.appropriationApplicationHistory(applicant,pagingBean);
	}

	public void rejectAppropriationApplication(String appropriationApplicationId,
			String reason) {
		this.appropriationApplicationDao.rejectAppropriationApplication(appropriationApplicationId,reason);	
	}

	public void approveAppropriationApplication(String appropriationApplicationId) {
		this.appropriationApplicationDao.approveAppropriationApplication(appropriationApplicationId);	
	}

	public void appropriationApplicationListForCheck(String approverId,
			PagingBean<AppropriationApplication> pagingBean) {
		this.appropriationApplicationDao.appropriationApplicationListForCheck(approverId,pagingBean);
		
	}
	
	public double totalAppropriationOutcome(){
		return this.appropriationApplicationDao.totalAppropriationOutcome();
	}
}
